home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk180 / arexxtutorial / rexxarplib / editall.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-19  |  537b  |  40 lines

  1. /** getall.rexx
  2. *
  3. *   This function edits all files matching the wildcards specified.
  4. *
  5. **/
  6. parse arg fn
  7.  
  8. ss = strip(ss)
  9. options prompt "Next? "
  10.  
  11. if fn = "" then do
  12.    say "Usage: editall <wildcards>"
  13.    exit
  14. end
  15.  
  16. call filelist(fn, files, F)
  17.  
  18. if files.0 = 0 then do
  19.    say "No files found"
  20.    exit
  21. end
  22.  
  23. do i = 1 to files.0
  24.    if files.i = "" then leave
  25.  
  26.    if i ~= 1 then do
  27.       parse pull yesno
  28.       if left(yesno, 1) = 'n' then do
  29.          say "Aborted"
  30.          exit
  31.       end
  32.    end
  33.  
  34.    'e 'files.i' sticky'
  35. end
  36.  
  37. say "Done"
  38.  
  39. exit
  40.